package cn.yanlin.springcloud;

import cn.yanlin.rule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;

/**
 * @author zhangyanlin
 * @version 1.0
 * @date 2021/10/8 20:46
 */
@SpringBootApplication
@EnableEurekaClient
//更换eureka集成的ribbon负载均衡算法为随机,Ribbon出厂默认算法为轮询
//更换算法不能放在ComponentScan扫描到的包或者子包下,须要重新建立包地址
@RibbonClient(name = "CLOUD-PAYMENT-SERVICE",configuration = MySelfRule.class)
public class OrderMain80 {
    public static void main(String[] args) {
        SpringApplication.run(OrderMain80.class,args);
    }
}
